home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-10-01 | 6.5 KB | 179 lines | [TEXT/Rich] |
-
-
-
-
- // Here's an example crontab file, based on one I’ve found useful
- // on the Mac in my office.
- //
- // Note that all the commands used in this crontab file have been
- // copied, or aliased, into cron's directory in order to save me
- // the trouble of providing pathnames to the commands.
- //
- //
- // QuickRef: The fields of a crontab entry specify the following:
- //
- // Field Meaning
- // ----- ------------------------------------------------------
- // 1 Minute (0-59)
- // 2 Hour (0-23)
- // 3 Day of the month (1-31)
- // 4 Month of the year (1-12)
- // 5 Day of the week (1-7, with 1=Monday)
- // 6 User name (unused)
- // 7+ Command name and arguments (if command is preceded by
- // "-b" cron executes it in the background).
-
-
-
-
- // Get the correct date & time from one of several TCP-based Time
- // Protocol servers on the network. Do this at 3:00 every morning.
- // Note that MacTCP is required, and the Map control panel must be
- // set to the correct local time zone for this to work properly.
- //
- // Remember to use the -d option if you live in a part of the USA
- // that conforms to the Daylight Savings Time (DST) convention.
- //
- // We select 3:00 AM because the change to/from DST occurs at 2:00 AM,
- // and waiting a further hour guarantees that the change will be
- // caught in a (relatively) timely manner even if the Mac's clock is
- // running as much as an hour fast. Of course, you could just call the
- // server a lot more often, but it seems kind of pointless.
-
- 0 3 * * * nobody -b "tcp time client" -d hermes.chpc.utexas.edu apple.com nic.ddn.mil
-
-
-
-
- // Run the activity-report program every fifteen minutes during the
- // work day to help me keep track of what the heck I do.
-
- 0,15,30,45 9-17 * * 1-5 nobody activity-report -t 240 -p "Nobody expects the Spanish Inquisition! Your confession:" -l "Chris’ Activity Log.txt" -w "Spanish Inquisition"
-
-
-
-
- // Remind me of important events during the week.
-
- 00 17 * * 1-4 nobody -b echo -t 120 "It’s 5 o’clock and time go home now, Chris."
- 45 11 * * 5 nobody -b echo -t 120 "Yipes! Time for Texadelphia! Get out immediately or you won't get a table!"
- 00 17 * * 5 nobody -b echo -t 120 "Good news! It’s 5 o’clock on Friday afternoon! Go drink some beers, Chris."
- 00 09 * * 2 nobody -b echo -t 120 "It’s 9 o’clock and time, sadly, to take the consulting phone."
- 45 11 * * 2 nobody -b echo -t 120 "It’s 11:45 and time to unforward the consulting phone."
- 45 16 * * 2 nobody -b echo -t 120 "Chris! It’s Beans day! Time to run away...."
-
-
-
-
- // Run a screen saver after four minutes of idle time, or when
- // the mouse is in the top-right corner of the screen, but never
- // when it’s in the bottom-right corner. (Corners are 32x32
- // squares.)
- //
- // This set of commands causes the "cron fader" screen saver to
- // be used from 8 AM to 5:59 PM on weekdays. The "Midnight Sky
- // Fader" is used all the rest of the time.
-
- idlescreen 4 2 4 : * 8-16 * * 1-5 nobody "cron fader"
- idlescreen 4 2 4 : * 0-7 * * 1-5 nobody "Midnight Sky Fader"
- idlescreen 4 2 4 : * 17-23 * * 1-5 nobody "Midnight Sky Fader"
- idlescreen 4 2 4 : * * * * 6,7 nobody "Midnight Sky Fader"
-
- // Here's where we change-over from one screen saver to another.
- // We force the switch to "cron fader" at 8:00 AM on weekdays,
- // and the change to "Midnight Sky Fader" at 6:00 PM on weekdays.
-
- idlescreen 4-* 2 4 : 0 8 * * 1-5 nobody "cron fader"
- idlescreen 4-* 2 4 : 0 17 * * 1-5 nobody "Midnight Sky Fader"
-
-
-
-
- // The following lines run the Eudora mailer for me -- it's run
- // just before I get in the office in the morning (8:40 AM) and
- // afternoon (12:40 PM) so my mail will be waiting for me, and
- // at 3 AM so there won't be too much waiting to be downloaded
- // in the morning.
-
- 40 8 * * 1,2,4,5 nobody -b open -bc CSOm
- 40 12 * * 1-5 nobody -b open -bc CSOm
- 0 3 * * * nobody -b open -bc CSOm
-
- // This last line quits Eudora in an orderly fashion just before
- // the scheduled system shutdown. This gives Eudora (and, more to
- // the point, our sometimes finicky pop server) some extra time
- // to clean up.
-
- 50 3 * * * nobody -b quit -c CSOm
-
-
-
-
- // Open Nuntius newsreader at 3:30 AM every morning so that it can
- // check for new groups. That's all this does. Maybe this will
- // keep it from missing new groups when they're created; maybe not.
- // Anyway, it won't hurt.
-
- 30 3 * * * nobody -b open -c nNNn
-
-
-
-
- // The following lines attempt to reboot my Mac at approximately
- // 4 AM every morning, so that it can start the day fresh. The
- // redundant shutdown calls will have no effect unless someone in
- // the office using my Mac has cancelled one of the previous calls.
- // Since all these shutdown calls use the -i (interactive) option,
- // the user can conceivably cancel them all and go on working
- // uninterrupted, but, hopefully, they’ll get the idea....
- //
- // Note that the "Shutdown Announcement" sound file is in the same
- // directory as the sound command, so a pathname for the sound file
- // is unnecessary.
- //
- // The -d option forces the desktops on all mounted volumes (where
- // applicable) to be deleted, which causes the Finder to rebuild
- // them when the system comes back up.
-
- 50 3 * * * nobody -b sound "Shutdown Announcement"
-
- 50 3 * * * nobody shutdown -ird 600 "Please prepare for the nightly system restart…"
- 55 3 * * * nobody shutdown -ird 300 "Please prepare for the nightly system restart…"
- 58 3 * * * nobody shutdown -ird 120 "Please prepare for the nightly system restart…"
- 59 3 * * * nobody shutdown -ird 60 "Please prepare for the nightly system restart…"
-
-
-
-
- // The following lines mount all the volumes of our office file
- // server. Because executables can’t be relaunched (and the mountafp
- // command currently performs only one mount at a time) we have to
- // make these calls sequentially. (The passwords have been changed
- // to protect the innocent.)
-
- 8 4 * * * nobody -b mountafp CC.Taylor "UT Micro Services" "UT Microservices" username password
- 9 4 * * * nobody -b mountafp CC.Taylor "UT Micro Services" tmp username password
-
- // Now that the file servers are mounted, we’ll disinfect all mounted
- // volumes. Note that this only works with Disinfectant 3.x which
- // hasn’t been released yet, so this won't do you any good. :-(
-
- 0 4 * * * nobody -b disinfect -a
-
- // By this time (7:00 AM), the disinfection is always complete, so
- // we’ll unmount all the file server volumes.
-
- 0 7 * * * nobody -b unmount "UT Microservices" tmp
-
-
-
-
- // Run Dave Platt's uupc 3.x twice early in the morning (at 1:17 AM
- // and 6:17 AM) so it can connect with the ut-emx host.
-
- 17 1,6 * * * nobody -b uupc -bq ut-emx
-
-
-
-
-